package com.ruoyi.system.domain;

import com.alibaba.fastjson2.JSONObject;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

/**
 * 指令配置对象 t_alarm_rule
 * 
 * @author wp
 * @date 2023-08-10
 */
@NoArgsConstructor
@AllArgsConstructor
@Data
@Accessors(chain = true)
@TableName(value = "t_alarm_rule", excludeProperty = {"createBy", "updateBy","remark"})
public class AlarmRule extends BaseEntity {

    /** 唯一主键 */
    @TableId(type = IdType.ASSIGN_ID)
    private Long id;

    /** 所属作业公司 */
    @ApiModelProperty("所属作业公司")
    private Long companyId;

    /** 规则名称 */
    @ApiModelProperty("规则名称")
    private String name;

    /** 规则类型(规则类型：1：围栏告警2：线路偏移3：超速规则4：路段限速) */
    @ApiModelProperty("规则类型(规则类型：1：围栏告警2：线路偏移3：超速规则4：路段限速)")
    private Long ruleType;

    /** 报警类型 */
    @ApiModelProperty("报警类型")
    private String pageTag;

    /** 规则属性 */
    @ApiModelProperty("规则属性")
    private String ruleAttr;

    /** 配置值 */
    @ApiModelProperty("配置值")
    @TableField(typeHandler = JacksonTypeHandler.class)
    private JSONObject confValue;

    @ApiModelProperty("公司名称")
    @TableField(exist = false)
    private String companyName;

}
